<?php
include_once("functions_domains.php");
include_once("config.php");


mysql_connect($host, $username, $password) or die("cannot connect");
mysql_select_db("$db_name")or die("cannot select DB");

$sql="select logbookid, URI from logbook where IFNULL(domein,'') = '' limit 0, 100;";
$result=mysql_query($sql);

while ($row = mysql_fetch_array($result)){
    mysql_query("Update logbook set domein = '" . GetDomain($row['URI']) . "' where logbookid = " . $row['logbookid']);
}
?>
Ok
